/*
 * Author  : Leo <lipf160627@163.com>
 * Created : 2025-8-27
 * Desc    : 
 */

#include "servo.h"

#include "tim.h"

void Servo_Init(void)
{
    HAL_TIM_PWM_Start(&htim5, TIM_CHANNEL_3);

    Servo_HolderAngle(0);
}

void Servo_HolderAngle(float Angle)
{
    __HAL_TIM_SET_COMPARE(&htim5, TIM_CHANNEL_3, Angle / 180 * 2000 + 500);
}
